/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package ua.i.kotionokyurievna.jewelry.domain.address;





/**
 *
 * @author Kateryna_Reznik
 */
public class Address {
    private int addressId;
    private String streetAddress;
    private String city;
    private String area;
    private String region;
    private String country;
    private String postalCode;

    public Address() {
    }

    public Address(String streetAddress, String city, String area, String region, String country, String postalCode) {
        this.streetAddress = streetAddress;
        this.city = city;
        this.area = area;
        this.region = region;
        this.country = country;
        this.postalCode = postalCode;
    }

    public Address(int addressId, String streetAddress, String city, String area, String region, String country, String postalCode) {
        this.addressId = addressId;
        this.streetAddress = streetAddress;
        this.city = city;
        this.area = area;
        this.region = region;
        this.country = country;
        this.postalCode = postalCode;
    }

    public int getAddressId() {
        return addressId;
    }

    public String getStreetAddress() {
        return streetAddress;
    }

    public void setStreetAddress(String streetAddress) {
        this.streetAddress = streetAddress;
    }

    public String getCity() {
        return city;
    }

    public void setCity(String city) {
        this.city = city;
    }

    public String getArea() {
        return area;
    }

    public void setArea(String area) {
        this.area = area;
    }

    public String getRegion() {
        return region;
    }

    public void setRegion(String region) {
        this.region = region;
    }

    public String getCountry() {
        return country;
    }

    public void setCountry(String country) {
        this.country = country;
    }

    public String getPostalCode() {
        return postalCode;
    }

    public void setPostalCode(String postalCode) {
        this.postalCode = postalCode;
    }

    @Override
    public String toString() {
        return "Address{" + "streetAddress=" + streetAddress + ", city=" + 
                city + ", area=" + area + ", region=" + region + 
                ", country=" + country + ", postalCode=" + postalCode + '}';
    }

    @Override
    public int hashCode() {
        int hash = 7;
        hash = 29 * hash + (this.streetAddress != null ? this.streetAddress.hashCode() : 0);
        hash = 29 * hash + (this.city != null ? this.city.hashCode() : 0);
        hash = 29 * hash + (this.area != null ? this.area.hashCode() : 0);
        hash = 29 * hash + (this.region != null ? this.region.hashCode() : 0);
        hash = 29 * hash + (this.country != null ? this.country.hashCode() : 0);
        hash = 29 * hash + (this.postalCode != null ? this.postalCode.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object obj) {
        if (obj == null) {
            return false;
        }
        if (getClass() != obj.getClass()) {
            return false;
        }
        final Address other = (Address) obj;
        if ((this.streetAddress == null) ? (other.streetAddress != null) : 
                !this.streetAddress.equals(other.streetAddress)) {
            return false;
        }
        if ((this.city == null) ? (other.city != null) : 
                !this.city.equals(other.city)) {
            return false;
        }
        if ((this.area == null) ? (other.area != null) : 
                !this.area.equals(other.area)) {
            return false;
        }
        if ((this.region == null) ? (other.region != null) : 
                !this.region.equals(other.region)) {
            return false;
        }
        if ((this.country == null) ? (other.country != null) : 
                !this.country.equals(other.country)) {
            return false;
        }
        if ((this.postalCode == null) ? (other.postalCode != null) : 
                !this.postalCode.equals(other.postalCode)) {
            return false;
        }
        return true;
    }
    
    
    
}
